package com.lyw.home.vm

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.blankj.utilcode.util.GsonUtils
import com.blankj.utilcode.util.LogUtils
import com.lu.library.CommLibInit
import com.lyw.db.DatabaseProvider
import com.lyw.home.bean.AuthorDetail
import com.lyw.home.bean.DetailIntro
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext

class AuthorDetailVm : ViewModel() {


    private var _authorDetail = MutableStateFlow(AuthorDetail())
    var authorDetail: StateFlow<AuthorDetail> = _authorDetail.asStateFlow()


    private var _detailList = MutableStateFlow(listOf<DetailIntro>())
    var detailList: StateFlow<List<DetailIntro>> = _detailList.asStateFlow()



    fun initData(id: Int) {

        viewModelScope.launch {

        }
    }
}